package com.song.config.client.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 
 * @description : 程序的入口类，写一个API接口“／hi”，返回从配置中心读取的foo变量的值，代码如下
 * @date        : 2018-08-09 17:36
 * @author      : leoSong
 *
 */
@RefreshScope
@RestController
public class ConfigClientController {
    @Value("${info.profile}")
    String test;
  
    @RequestMapping(value = "/hi")
    public String hi() {
      return test;
    }
}
